#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QTcpSocket>
#include "socketmanager.h"
#include "telephone_number.h"
#include "register.h"
#include "courier.h"
#include "consignee.h"
#include "courier_main.h"
#include "courier_add.h"
#include "consignee_main.h"
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE



//主窗口
class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
    void connect_client();
    void page1_init();

private slots:
    void start();

    void rgttomain();
    void on_pushButton_3_clicked();
    void returnRegister();
    void registertocourier();
    void couriertomain();
    void consigneetomain();
    void rgttoconsignee();
    void consigneeToRegister();
    void on_pushButton_2_clicked();
    void addtomain_courier();
    void maintoadd();
private:
    Ui::MainWindow *ui;
    Register *register_page;
    Courier * courier_page;
    Consignee * consignee_page;
    Courier_main * courier_main_page;
    Courier_add * courier_add_page;
    Consignee_main * consignee_main_page;
    QTcpSocket *socket;
    bool connectstate;
};



#endif // MAINWINDOW_H
